import {createApp} from 'vue';
import App from './App.vue';
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import router from './router/index.js';
import store from './util/store.js';
import 'virtual:svg-icons-register'
import SvgIcon from "@/components/SvgIcon.vue";
import "virtual:svg-icons-register";
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import './assets/style/global.less'

const app = createApp(App);

dayjs.locale('zh-cn');
app.use(ElementPlus, {
	locale: zhCn,
});
app.use(router);
app.use(store);
app.component("svg-icon", SvgIcon)
app.config.globalProperties.$routerAppend = (path, pathToAppend) => {
	return `${path}${path.endsWith('/') ? '' : '/'}${pathToAppend}`;
};
app.mount('#app');
